package com.letoy.edu.controller;

import com.letoy.edu.service.FieldService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@RestController
@Api(value = "课程信息管理", tags = "课程信息API")
@RequestMapping("/field")
public class FieldController {

    @Resource
    FieldService fieldService;


    @PostMapping("/getAllField")
    @ApiOperation(value = "查询所有场地信息", notes = "查询所有场地信息")
    private Map<String, Object> getAllField() {
        Map<String, Object> mapper = new HashMap<>();
        mapper.put("data", fieldService.getAllFieldList());
        return mapper;
    }


}
